package com.tjsinfo.tjsoa.documentationflow.xingzhengfawen.task;

import org.jbpm.graph.exe.ExecutionContext;
import org.jbpm.taskmgmt.def.AssignmentHandler;
import org.jbpm.taskmgmt.exe.Assignable;

import com.tjsinfo.tjsoa.message.vo.TjsMessage;
/**
 * 基础工作流任务分配类
 * @author Administrator
 *
 */
public class BaseTaskAssignment implements AssignmentHandler{

	/* (non-Javadoc)
	 * @see org.jbpm.taskmgmt.def.AssignmentHandler#assign(org.jbpm.taskmgmt.exe.Assignable, org.jbpm.graph.exe.ExecutionContext)
	 */
	public void assign(Assignable assignable, ExecutionContext executionContext)
			throws Exception {
		// TODO Auto-generated method stub
		String context =	(String) executionContext.getVariable(executionContext.getTask().getDescription().trim());
		assignable.setActorId(context);
//		String flowName = (String) executionContext.getVariable("流程名称");
	//	TjsMessage message1 = new TjsMessage();
//		message1.setRecuserid(Integer.valueOf(context));
//		message1.setValue("您有一个待办");
	//	TjsMessage.send(message1);
	}
}
